<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DOM_获取元素对象</title>

</head>
<body>

<img id="light" src="img/off.gif" alt="">
<h1 id="title">收到后发顺丰</h1>

<script>
        // 通过 id 获取元素对象
        //var light = document.getElementById("light");
        //alert("我要换图片...");
        //light.src = "img/on.gif";

        // 获取元素
        var title = document.getElementById("title");
        // 修改标签
        title.innerHTML = "时间的繁花似锦地方";



</script>

</body>
</html>